package independence.pinetree.testing;

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.net.InetAddress;
import java.net.InetSocketAddress;
import java.net.Socket;

public class SimpleReaderClient {

	/**
	 * @param args
	 */
	public static void main(String[] args) throws IOException {
		Socket socket = new Socket();
		socket.connect(new InetSocketAddress(InetAddress.getLocalHost(), 8733));
		BufferedReader reader = new BufferedReader(new InputStreamReader(socket.getInputStream()));
		
		while (true) {
			String line = reader.readLine();
			if (line != null) {
				System.out.println("Client received message: " + line);				
			}
		}
	}

}
